package ar.edu.itba.bundundu;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.code.facebookapi.FacebookParam;


public class BundunduServlet extends HttpServlet implements Servlet{
	private static final long serialVersionUID = 1L;

	public BundunduServlet(){
		super();
	}

	public void doPost(HttpServletRequest req, HttpServletResponse resp){
		
	}
	
	
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		
		RequestDispatcher dispacher;
		dispacher= getServletContext().getRequestDispatcher("/bundundu.jsp");
		
		
		Facebook facebook= new Facebook(req.getParameter(FacebookParam.SESSION_KEY.toString()));
		Long fid;
		//try {
		/*	fid = facebook.getClient().users_getLoggedInUser();
			req.setAttribute("fid", fid);*/
			req.setAttribute("prueba", "probando");
				
			//System.out.println(eventArray.getString(0));
			//System.out.println(eventArray.getString(1));
				
			dispacher.forward(req, resp);
		/*} catch (FacebookException e) {
				// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
			
			
			
		
		
		
	}
	
	
}
